package com.linpq.road.service;

import java.util.List;
import com.linpq.common.core.service.CrudService;
        import com.linpq.common.utils.DateUtils;
            import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.linpq.road.mapper.RdPavementPerformanceMapper;
import com.linpq.road.domain.RdPavementPerformance;
import com.linpq.common.core.text.Convert;
import com.linpq.common.core.service.BaseService;
/**
 * 路面性能Service业务层处理
 *
 * @author linpq
 * @date 2021-07-29
 */
@Service
public class RdPavementPerformanceService  extends CrudService<RdPavementPerformanceMapper, RdPavementPerformance> {

    /**
     * 查询路面性能
     *
     * @param id 路面性能ID
     * @return 路面性能
     */

    public RdPavementPerformance selectRdPavementPerformanceById(String id) {
        return dao.get(id);
    }

    /**
     * 查询路面性能列表
     *
     * @param rdPavementPerformance 路面性能
     * @return 路面性能
     */

    public List<RdPavementPerformance> selectRdPavementPerformanceList(RdPavementPerformance rdPavementPerformance) {
        return dao.findList(rdPavementPerformance);
    }

    /**
     * 新增路面性能
     *
     * @param rdPavementPerformance 路面性能
     * @return 结果
     */

    public int insertRdPavementPerformance(RdPavementPerformance rdPavementPerformance) {
        rdPavementPerformance.setCreateTime(DateUtils.getNowDate());
        return super.save(rdPavementPerformance);
    }

    /**
     * 修改路面性能
     *
     * @param rdPavementPerformance 路面性能
     * @return 结果
     */

    public int updateRdPavementPerformance(RdPavementPerformance rdPavementPerformance) {
                rdPavementPerformance.setUpdateTime(DateUtils.getNowDate());
        return super.save(rdPavementPerformance);
    }

    /**
     * 删除路面性能对象
     *
     * @param ids 需要删除的数据ID
     * @return 结果
     */

    public int deleteRdPavementPerformanceByIds(String ids) {
        return dao.deleteRdPavementPerformanceByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除路面性能信息
     *
     * @param id 路面性能ID
     * @return 结果
     */
    public int deleteRdPavementPerformanceById(String id) {
        return dao.delete(id);
    }
}
